package p.ithorns.integration.transform.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import p.ithorns.integration.transform.enums.OrderType;
import p.ithorns.tools.translator.annotation.field.EnumField;
import p.ithorns.tools.translator.annotation.meta.MapDictMeta;

/**
 * OrderExt
 *
 * @author HtL
 * @date 2025/3/3 17:02
 * @since 1.0.0
 */
//@DictGen
@Getter
@Setter
public class OrderExt extends Order {

    private int index;

    @TableField(value = "status")
    @MapDictMeta(mapOf = {"0:无", "1:有"})
    private String status;

    @ApiModelProperty(value = "类型")
    @TableField(value = "type")
    @EnumField(from = "type", type = OrderType.class)
    protected String typeLabel;

    @Override
    public String toString() {
        return "{" +
                "id:" + id +
                ", type:" + type + "-" + typeLabel + '\'' +
                ", detail:" + detail +
                ", index:" + index +
                ", status:'" + status + //"-" + getStatusLabel() + '\'' +
                "}";
    }

}